package com.geek.concurrence4work;

import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;

/**
 * @Author: lishuangqiang
 * @Date: 2021/11/28
 * @Description:
 */

public class CompletableFutureMethod {
    public static void main(String[] args) throws ExecutionException, InterruptedException {
        CompletableFuture<Long> res = CompletableFuture.supplyAsync(() -> Homework03.sum3());
        System.out.println(res.get());
    }
}
